<?php

class Ext_Acl
{
    protected static $instance = null;

    protected $_acls = array();

    public static function getInstance()
    {
        if (null === self::$instance) {
            self::$instance = new self();
        }

        return self::$instance;
    }
    
    protected function __construct()
    {
        
    }
    
    public function build($roleId)
    {
        if(isset($this->_acls[$roleId])){
            return $this->_acls[$roleId];
        }

        $build = new Ext_Acl_Build();

        $this->_acls[$roleId] = $build->build($roleId)->acl;
        return $this->_acls[$roleId];
    }
}
